load("@build_bazel_rules_android//android:rules.bzl", "android_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

java_library(
    name = "cha_cha20_util",
    srcs = ["ChaCha20Util.java"],
)

java_library(
    name = "insecure_nonce_aes_gcm_jce",
    srcs = ["InsecureNonceAesGcmJce.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

java_library(
    name = "insecure_nonce_cha_cha20",
    srcs = ["InsecureNonceChaCha20.java"],
    deps = [
        ":cha_cha20_util",
        ":insecure_nonce_cha_cha20_base",
    ],
)

java_library(
    name = "insecure_nonce_cha_cha20_base",
    srcs = ["InsecureNonceChaCha20Base.java"],
    deps = [
        ":cha_cha20_util",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
    ],
)

java_library(
    name = "insecure_nonce_cha_cha20_poly1305",
    srcs = ["InsecureNonceChaCha20Poly1305.java"],
    deps = [
        ":insecure_nonce_cha_cha20",
        ":insecure_nonce_cha_cha20_base",
        ":insecure_nonce_cha_cha20_poly1305_base",
    ],
)

java_library(
    name = "insecure_nonce_cha_cha20_poly1305_base",
    srcs = ["InsecureNonceChaCha20Poly1305Base.java"],
    deps = [
        ":insecure_nonce_cha_cha20_base",
        ":poly1305",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
    ],
)

java_library(
    name = "insecure_nonce_x_cha_cha20",
    srcs = ["InsecureNonceXChaCha20.java"],
    deps = [
        ":cha_cha20_util",
        ":insecure_nonce_cha_cha20_base",
    ],
)

java_library(
    name = "insecure_nonce_x_cha_cha20_poly1305",
    srcs = ["InsecureNonceXChaCha20Poly1305.java"],
    deps = [
        ":insecure_nonce_cha_cha20_base",
        ":insecure_nonce_cha_cha20_poly1305_base",
        ":insecure_nonce_x_cha_cha20",
    ],
)

java_library(
    name = "poly1305",
    srcs = ["Poly1305.java"],
    deps = ["//src/main/java/com/google/crypto/tink/subtle:bytes"],
)

# Android libraries

android_library(
    name = "cha_cha20_util-android",
    srcs = ["ChaCha20Util.java"],
)

android_library(
    name = "insecure_nonce_aes_gcm_jce-android",
    srcs = ["InsecureNonceAesGcmJce.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

android_library(
    name = "insecure_nonce_cha_cha20-android",
    srcs = ["InsecureNonceChaCha20.java"],
    deps = [
        ":cha_cha20_util-android",
        ":insecure_nonce_cha_cha20_base-android",
    ],
)

android_library(
    name = "insecure_nonce_cha_cha20_base-android",
    srcs = ["InsecureNonceChaCha20Base.java"],
    deps = [
        ":cha_cha20_util-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
    ],
)

android_library(
    name = "insecure_nonce_cha_cha20_poly1305-android",
    srcs = ["InsecureNonceChaCha20Poly1305.java"],
    deps = [
        ":insecure_nonce_cha_cha20-android",
        ":insecure_nonce_cha_cha20_base-android",
        ":insecure_nonce_cha_cha20_poly1305_base-android",
    ],
)

android_library(
    name = "insecure_nonce_cha_cha20_poly1305_base-android",
    srcs = ["InsecureNonceChaCha20Poly1305Base.java"],
    deps = [
        ":insecure_nonce_cha_cha20_base-android",
        ":poly1305-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
    ],
)

android_library(
    name = "insecure_nonce_x_cha_cha20-android",
    srcs = ["InsecureNonceXChaCha20.java"],
    deps = [
        ":cha_cha20_util-android",
        ":insecure_nonce_cha_cha20_base-android",
    ],
)

android_library(
    name = "insecure_nonce_x_cha_cha20_poly1305-android",
    srcs = ["InsecureNonceXChaCha20Poly1305.java"],
    deps = [
        ":insecure_nonce_cha_cha20_base-android",
        ":insecure_nonce_cha_cha20_poly1305_base-android",
        ":insecure_nonce_x_cha_cha20-android",
    ],
)

android_library(
    name = "poly1305-android",
    srcs = ["Poly1305.java"],
    deps = ["//src/main/java/com/google/crypto/tink/subtle:bytes-android"],
)

android_library(
    name = "aes_gcm_proto_serialization-android",
    srcs = ["AesGcmProtoSerialization.java"],
    deps = [
        "//proto:aes_gcm_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "x_cha_cha20_poly1305_proto_serialization-android",
    srcs = ["XChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        "//proto:tink_java_proto_lite",
        "//proto:xchacha20_poly1305_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_key-android",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_parameters-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "aes_gcm_proto_serialization",
    srcs = ["AesGcmProtoSerialization.java"],
    deps = [
        "//proto:aes_gcm_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "x_cha_cha20_poly1305_proto_serialization",
    srcs = ["XChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        "//proto:tink_java_proto",
        "//proto:xchacha20_poly1305_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "legacy_aes_ctr_hmac_test_key_manager-android",
    testonly = 1,
    srcs = ["LegacyAesCtrHmacTestKeyManager.java"],
    deps = [
        "//proto:aes_ctr_hmac_aead_java_proto_lite",
        "//proto:aes_ctr_java_proto_lite",
        "//proto:common_java_proto_lite",
        "//proto:hmac_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_manager-android",
        "//src/main/java/com/google/crypto/tink:mac-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_jce_cipher-android",
        "//src/main/java/com/google/crypto/tink/subtle:encrypt_then_authenticate-android",
        "//src/main/java/com/google/crypto/tink/subtle:prf_hmac_jce-android",
        "//src/main/java/com/google/crypto/tink/subtle:prf_mac-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "legacy_aes_ctr_hmac_test_key_manager",
    testonly = 1,
    srcs = ["LegacyAesCtrHmacTestKeyManager.java"],
    deps = [
        "//proto:aes_ctr_hmac_aead_java_proto",
        "//proto:aes_ctr_java_proto",
        "//proto:common_java_proto",
        "//proto:hmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_manager",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_jce_cipher",
        "//src/main/java/com/google/crypto/tink/subtle:encrypt_then_authenticate",
        "//src/main/java/com/google/crypto/tink/subtle:prf_hmac_jce",
        "//src/main/java/com/google/crypto/tink/subtle:prf_mac",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "legacy_full_aead",
    srcs = ["LegacyFullAead.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:crypto_format",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
        "//src/main/java/com/google/crypto/tink/internal:output_prefix_util",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:registry_configuration",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/util:bytes",
    ],
)

android_library(
    name = "legacy_full_aead-android",
    srcs = ["LegacyFullAead.java"],
    deps = [
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:crypto_format-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key-android",
        "//src/main/java/com/google/crypto/tink/internal:output_prefix_util-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:registry_configuration-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
    ],
)

java_library(
    name = "cha_cha20_poly1305_jce",
    srcs = ["ChaCha20Poly1305Jce.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "cha_cha20_poly1305_jce-android",
    srcs = ["ChaCha20Poly1305Jce.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_key-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/subtle:hex-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "insecure_nonce_cha_cha20_poly1305_jce",
    srcs = ["InsecureNonceChaCha20Poly1305Jce.java"],
    deps = [
        ":cha_cha20_poly1305_jce",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "insecure_nonce_cha_cha20_poly1305_jce-android",
    srcs = ["InsecureNonceChaCha20Poly1305Jce.java"],
    deps = [
        ":cha_cha20_poly1305_jce-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "x_cha_cha20_poly1305_jce",
    srcs = ["XChaCha20Poly1305Jce.java"],
    deps = [
        ":cha_cha20_poly1305_jce",
        ":cha_cha20_util",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "x_cha_cha20_poly1305_jce-android",
    srcs = ["XChaCha20Poly1305Jce.java"],
    deps = [
        ":cha_cha20_poly1305_jce-android",
        ":cha_cha20_util-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_key-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_ctr_hmac_aead_proto_serialization",
    srcs = ["AesCtrHmacAeadProtoSerialization.java"],
    deps = [
        "//proto:aes_ctr_hmac_aead_java_proto",
        "//proto:aes_ctr_java_proto",
        "//proto:common_java_proto",
        "//proto:hmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "aes_ctr_hmac_aead_proto_serialization-android",
    srcs = ["AesCtrHmacAeadProtoSerialization.java"],
    deps = [
        "//proto:aes_ctr_hmac_aead_java_proto_lite",
        "//proto:aes_ctr_java_proto_lite",
        "//proto:common_java_proto_lite",
        "//proto:hmac_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_key-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aes_eax_proto_serialization-android",
    srcs = ["AesEaxProtoSerialization.java"],
    deps = [
        "//proto:aes_eax_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_key-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_parameters-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "aes_eax_proto_serialization",
    srcs = ["AesEaxProtoSerialization.java"],
    deps = [
        "//proto:aes_eax_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_parameters",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "aes_gcm_siv_proto_serialization-android",
    srcs = ["AesGcmSivProtoSerialization.java"],
    deps = [
        "//proto:aes_gcm_siv_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_siv_key-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_siv_parameters-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "aes_gcm_siv_proto_serialization",
    srcs = ["AesGcmSivProtoSerialization.java"],
    deps = [
        "//proto:aes_gcm_siv_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_siv_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_siv_parameters",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "cha_cha20_poly1305_proto_serialization",
    srcs = ["ChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        "//proto:chacha20_poly1305_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "cha_cha20_poly1305_proto_serialization-android",
    srcs = ["ChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        "//proto:chacha20_poly1305_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_key-android",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_parameters-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)
